Page({

  /**
   * 页面的初始数据
   */
  data: {
    all:[
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
    ],
    datas:[
        [
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"110电阻色环",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],
        [
            {name:"xxxx",describe:"xxx",img:"../../images/index.png"},
            {name:"xxx",describe:"电阻色环定义方式表格及...",img:"../../images/index.png"},
            {name:"xxx",describe:"xxx...",img:"../../images/index.png"},
        ],

    ],
    _id:1,
    title:"工具资料",
    height:500,
    one:false,
    onelittle:false,
    two:false,
    three:false
  },
  onLoad:function(){
    var _this=this;
    wx.getSystemInfo({  
            success: function( res ) {  
                console.log(res.windowHeight)
                _this.setData({  
                  height: res.windowHeight-48  
                });  
            }  
    });
  
  },
  change:function(e){
    var _this=this;
    var index=parseInt(e.target.dataset.id)-1;
    this.setData({
    _id:e.target.dataset.id,
    title:e.target.dataset.title,
    all:_this.data.datas[index]
  })
  },
  show:function(e){
    if(e.target.dataset.type=="one"){
        this.setData({
            one:true
        })
    }
    if(e.target.dataset.type=="onelittle"){
        this.setData({
            onelittle:true
        })
    }
    if(e.target.dataset.type=="two"){
        this.setData({
            two:true
        })
    }
  },
  hide:function(e){
    if(e.target.dataset.type=="one"){
        this.setData({
            one:false
        })
    }
    if(e.target.dataset.type=="onelittle"){
        this.setData({
            onelittle:false
        })
    }
    if(e.target.dataset.type=="two"){
        this.setData({
            two:false
        })
    }
  }
})